
<div class="pageContent">
	<div id="resultBox"></div>
	<form method="post" action="<?echo __WWWROOT__.'Admin/Role/update.php'?>" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
		<div class="pageFormContent" layoutH="56">
			<input type="hidden" name="id" value="<?echo $role_info['id']?>">
			<dl>
				<dt>名称：</dt>
				<dd><input name="name" class="required" type="text" size="30" value="<?echo $role_info['name']?>" alt=""/></dd>
			</dl>
			<dl>
				<dt>授权：</dt>
				<dd>
					<div style="overflow:auto; width:300px; height:400px; border:solid 1px #CCC; line-height:21px; background:#FFF;">
					<ul id="t2" class="tree treeFolder treeCheck expand"  oncheck=""><?echo $trees?></ul>
					</div>
				</dd>
			</dl>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit" onclick="treeclick">编辑</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>

<script type="text/javascript">
	function kkk(){
		var json = arguments[0], result="";
		//alert(json.checked);
		$(json.items).each(function(i){
			result += "<p>name:"+this.name + " value:"+this.value+" text: "+this.text+"</p>";
		});
		$("#resultBox").html(result);
	}
	function treeclick(){
		var oldstr="";
		$("#t2 input:checked").each(function(i,a){
			alert(a.value);
			oldstr += a.value;
		});
		$("#resultBox").html(oldstr);
	}
	/*
	$(document).find("input[type=checkbox]").each(function(i){
		this.readonly = "readonly";
		//$(this).attr("readonly", "readonly");
	});
	*/
</script>
